import asyncio
from utils.uow import UnitOfWork
from utils.db_funcs import end_flights_where_time_end


async def end_flights() -> None:
    while True:
        async with UnitOfWork() as uow:
            await end_flights_where_time_end(uow)

        await asyncio.sleep(1)
